home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17865 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.7 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.eiffel,comp.lang.c,comp.lang.c++,comp.object,comp.software-eng
  4. Subject: Re: Beware of "C" Hackers -- A rebuttal to Bertrand Meyer
  5. Date: 17 Apr 1996 12:11:31 -0700
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4l3fp3INNemp@keats.ugrad.cs.ubc.ca>
  8. References: <1995Jul3.034108.4193@rcmcon.com> <4kma54$11m@news4.digex.net> <goochb.334.0015B418@rwi.com> <4l3auv$jnt@onramp.arc.nasa.gov>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <4l3auv$jnt@onramp.arc.nasa.gov>,
  12. Hugh LaMaster <lamaster@viking.arc.nasa.gov> wrote:
  13. >In article <goochb.334.0015B418@rwi.com>, 
  14. >goochb@rwi.com (William D. Gooch) writes:
  15. >
  16. >|> Kazimir Kylheku (c2a192@ugrad.cs.ubc.ca) wrote:
  17. >|>  
  18. >|> >The OO arena is a philosophical one. I don't particularly subscribe to the  
  19. >|> >view
  20. >|> >that there ought to be a naive correspondence between software entities and
  21. >|> >some ``real world'' entities,  ....
  22. >|> 
  23. >|> Nor do I.  The (apparently widespread) idea that such correspondence 
  24. >|> is in some way significant to the basis of object-oriented <whatever>
  25. >|> is, IMO, a gross misconception.  Object technology has a sound basis 
  26. >|> without it, and in programming, one is rarely modelling the "real world"
  27. >|> directly (except in UI, when building upon spatio-temporal "real world"
  28. >|> metaphors to bridge the gap between the abstractions a program is 
  29. >|> based on and the user, and even then, the models used are abstract).
  30. >
  31. >OTOH, it is interesting that it is in GUI/window development that 
  32. >O-O methods have been *generally* regarded (even by skeptics) as most 
  33. >successful.  So, perhaps, there is some significance after all to such 
  34. >correspondence.  At least, if what you care about is actual productivity,
  35.  
  36. I don't think that there is any Real-World Correspondence at work in the GUI
  37. arena. In real life, there are no widgets, events or callbacks.
  38.  
  39. The reason OO works, perhaps, is that GUIs are constructed in ways that map
  40. easily into the OO paradigm.  An element of asynchronous notification is
  41. dominant in any decent GUI programming interface. In a procedural language, it
  42. may be done using queues, callbacks and such. It maps naturally onto object
  43. message passing (which basically hides callback functions anyway in something
  44. like C++).
  45.  
  46. The user can (or should be able to most of the time) interact with any element
  47. of the GUI rather than being forced to interact procedurally. The application
  48. can design objects that are triggered by the GUI, and even combine the
  49. interface and functional elements into one object.
  50.  
  51. Since object instances have their own private data, it's easy to spin off
  52. multiple instances of the same widget without sharing state. Doing it in a
  53. language like C means moving all the static variables of the corresponding
  54. module into a dynamically allocated structure.  (Big ordeal, huh?) 
  55.  
  56. >rather than an O-O religious experience.  Now, in some applications,
  57. >the GUI is 99% of the app, but in others, I can assure you that it is
  58. >less than 1%.  It may simply be the case that O-O methods are more 
  59. >effective, pragmatically speaking, for the former case than for the
  60. >latter.  Why insist on applying the same techniques to every problem?
  61.  
  62. I would agree that the OO methods are effective, but they are probably overkill
  63. for GUI design. I suspect that OO is _easy_ to _apply_ in GUI development,
  64. because it is basically fluff work that can be done easily in just about _any_
  65. design paradigm and language. You don't have to contemplate a complicated
  66. taxonomy or get into any deep OO hair pulling, so if you are using OO for GUI
  67. design, it must look like the greatest thing since sliced bread.
  68. -- 
  69. I'm not really a jerk, but I play one on Usenet.
  70.